<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="__ADMIN__images/favicon.ico">
    <title>云栈互联内容管理系统</title>
	  <link href="__ADMIN__css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="__ADMIN__layui/css/layui.css"  media="all">
	  <style>
      body{background:#1f2b36;}
      .layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
    </style>
  </head>
  <body>
    <div class="layui-layout layui-layout-admin">
      <!--页头-->
      <div class="layui-header layui-layout-admin">
        <div class="layui-logo">内容管理系统</div>
          <!-- 头部区域（可配合layui已有的水平导航） -->
          <ul class="layui-nav layui-layout-left">
            <volist name="nav_data" id="val">
            <li class="layui-nav-item"><a href="javascript:_M({$val['id']},'{:U($val['url'])}');">{$val['name']}</a></li>
            </volist>
            <li class="layui-nav-item"><a href="/" target="_blank">站点预览</a></li>
          </ul>
          <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item refresh"><a href="javascript:;">刷新后台</a></li>
            <li class="layui-nav-item clearcache"><a href="javascript:;">清除缓存</a></li>
            <li class="layui-nav-item lockcms"><a href="javascript:;">锁屏</a></li>
            <li class="layui-nav-item">
              <a href="javascript:;">
              <empty name="adminInfo['headimg']">
                <img src="__ADMIN__images/face.jpg" class="layui-nav-img">
              <else/>
                <img src="/Uploads/{$adminInfo['headimg']}" class="layui-nav-img">
              </empty>
              {:get_username()} {:get_row('管理员组',$admin_group,'title')}
              </a>
              <dl class="layui-nav-child">
                <dd><a href="javascript:_MP('0','{:U('Admin/userinfo',array('id'=>$adminInfo['id']))}');">个人资料</a></dd>
                <dd><a href="javascript:_MP('0','{:U('Admin/editpass',array('id'=>$adminInfo['id']))}');">修改密码</a></dd>
                <dd><a href="javascript:;" onclick="Logout();">安全退出</a></dd>
              </dl>
            </li>
          </ul>
      </div>
      <div id="layout_main">
        <div class="col-left left_menu">
          <div id="leftMain"></div>
        </div>
        <div class="col-auto">
          <iframe name="right" id="rightMain" src="{:U('welcome')}" frameborder="false" scrolling="auto" style="overflow-x:hidden;" width="100%" height="auto" allowtransparency="true"></iframe>
        </div>
      </div>
      <div class="layui-footer">© 2015-2019 YunZhanNet 北京云栈互联科技有限公司，Inc.All rights reserved.</div>
    </div>
  <!-- 锁屏 -->
  <div class="admin-header-lock" id="lock-box" style="display: none;">
    <div class="admin-header-lock-img"><img src="__ADMIN__images/face.jpg"/></div>
    <div class="admin-header-lock-name" id="lockUserName">{:get_username()}</div>
    <div class="input_btn">
      <input type="password" class="admin-header-lock-input layui-input" placeholder="请输入密码解锁.." name="lockPwd" id="lockPwd" style="width:240px;display:inline-block;" />
      <button class="layui-btn" id="unlock">解锁</button>
    </div>
    <p>请输入您的锁屏密码！！！</p>
  </div>
  <script src="__ADMIN__layui/layui.js" charset="utf-8"></script>
  <script type="text/javascript" src="__ADMIN__js/jquery-1.9.1.min.js"></script>
  <script type="text/javascript" src="__ADMIN__js/script.js"></script>
  <script>
  layui.use(['form','element','layer','jquery'],function(){
  	/*锁屏*/
      $(".lockcms").on("click",function(){
  		window.sessionStorage.setItem("lockcms",true);
  		lockPage();
  	})
  	// 判断是否显示锁屏
  	if(window.sessionStorage.getItem("lockcms") == "true"){
  		lockPage();
  	}
  	// 解锁
  	$("#unlock").on("click",function(){
      var lockpwd = "{$adminInfo['clearpwd']}";
  		if($(this).siblings(".admin-header-lock-input").val() == ''){
  			layer.msg("请输入解锁密码！");
  		}else{
  			if($(this).siblings(".admin-header-lock-input").val() == lockpwd){
  				window.sessionStorage.setItem("lockcms",false);
  				$(this).siblings(".admin-header-lock-input").val('');
  				layer.closeAll("page");
  			}else{
  				layer.msg("密码错误，请重新输入！");
  			}
  		}
  	});

  	$(".clearcache").click(function(){
  		var srcurl = $("#rightMain").attr('src');
  		$("#rightMain").attr('src','/index.php?m=Yzadmin&c=Public&a=deleteCache&srcurl='+srcurl);
  	});
  	//默认载入左侧菜单
    $("#leftMain").load('/index.php?m=Yzadmin&c=Public&a=menu_nav');
    onresize();
  });
  </script>
</body>
</html>
